/**
 * 商品
 */
angular.module('mall.goods.impl', [])

    .config(['$stateProvider', '$urlRouterProvider', function ($stateProvider, $urlRouterProvider) {
        $stateProvider

        //商品列表页
            .state('goods.goods', {
                url: '',
                templateUrl: templateprefix + 'good/goods.html',
                controller: 'ImplGoodsController'
            })
    }])

    .controller('ImplGoodsController', ['$scope', '$window',
        function ($scope, $window) {
            $scope.mall_enturl = projectBaseUrl;
            //opacity_top("#content_kinds")
            dismiss();
            $scope.renderFinish = function () {
                $("#goods_info li").eq(0).addClass("active");
                $("#goods_list .tab-pane").eq(0).addClass("active");
                new transformScrolls("goods_info_ul", "goods_type_list", true);
            };

            $scope.addshopcart = function () {//加入购物车
                ShopcartService.addgoods($scope.shopid, $scope.chosed_order.cid, $scope.chosed_order.goodsid);
                alert("添加成功");
            }
        }
    ])
;
